package edu.njit.hz278.bean;

import org.codehaus.jackson.annotate.JsonSubTypes;
import org.codehaus.jackson.annotate.JsonSubTypes.Type;
import org.codehaus.jackson.annotate.JsonTypeInfo;
import org.codehaus.jackson.annotate.JsonTypeInfo.Id;
import org.codehaus.jackson.annotate.JsonTypeInfo.As;
import org.hibernate.validator.constraints.NotBlank;

/**
 * Employee.
 * 
 * @author Rivers Zhang
 * 
 */
@JsonTypeInfo(use = Id.NAME, include = As.PROPERTY, property = "jsonType")
@JsonSubTypes({ @Type(value = Physician.class, name = "p"),
		@Type(value = Nurse.class, name = "n"),
		@Type(value = Surgeon.class, name = "s"),
		@Type(value = Employee.class, name = "e")})
public class Employee {

	public static final String TYPE_NURSE = "Nurse";
	public static final String TYPE_PHYSICIAN = "Physician";
	public static final String TYPE_SURGEON = "Surgeon";
	public static final String TYPE_STAFF = "Staff";

	public static final int GENDER_FEMALE = 1;
	public static final int GENDER_MALE = 2;

	protected int empid;
	protected String name;
	protected int gender;
	
	@NotBlank
	protected String address;
	protected String ssn;
	protected String phone;
	protected double salary;
	protected String empType;

	public int getEmpid() {
		return empid;
	}

	public void setEmpid(int empid) {
		this.empid = empid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getGender() {
		return gender;
	}

	public void setGender(int gender) {
		this.gender = gender;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getSsn() {
		return ssn;
	}

	public void setSsn(String ssn) {
		this.ssn = ssn;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public double getSalary() {
		return salary;
	}

	public void setSalary(double salary) {
		this.salary = salary;
	}

	public String getEmpType() {
		return empType;
	}

	public void setEmpType(String empType) {
		this.empType = empType;
	}

}
